<div id="main-content">
  <div class="container-fluid">
    <ul class="breadcrumb">
      <li><a href="<?php print site_url("keuangan-mahasiswa/mahasiswa")?>"><?php print lang('keuangan_mahasiswa_mahasiswa')?></a><span class="divider">»</span></li>
      <li class="active"><?php print $title?></li>
    </ul>
    <div class="row-fluid">
			<div class="span12">
				<div class="widget-block">
					<div class="widget-head">
						<h5><?php print $title?></h5>
            <div class="widget-control pull-right">
              <a href="#" data-toggle="dropdown" class="btn dropdown-toggle"><i class="icon-cog"></i><b class="caret"></b></a>
              <ul class="dropdown-menu">
<!--                <li><a href="<?php print   site_url("keuangan-mahasiswa/generate-tanggungan/".$nim) ?>"><i class="icon-plus"></i><?php print lang("keuangan_mahasiswa_get_tanggungan")?></a></li>-->
                <li><a href="<?php print   site_url("keuangan-mahasiswa/keuangan-mahasiswa-report/ambil-kelebihan/{$id_keuangan_mahasiswa_jenis_virtual_account}/".$nim) ?>"><i class="icon-plus"></i><?php print lang("keuangan_mahasiswa_ambil_kelebihan")?></a></li>
                <li><a href="<?php print   site_url("keuangan-mahasiswa/add-tanggungan/{$id_keuangan_mahasiswa_jenis_virtual_account}/".$nim) ?>"><i class="icon-plus"></i><?php print lang("keuangan_mahasiswa_tambahan_tanggungan")?></a></li>
                <li><a href="<?php print   site_url("keuangan-mahasiswa/payment-mahasiswa/".$nim."/".$id_keuangan_mahasiswa_jenis_virtual_account) ?>"><i class="icon-plus"></i><?php print lang("keuangan_mahasiswa_payment")?></a></li>
              </ul>
            </div>
					</div>
					<div class="widget-content">
            <div class="widget-searchbox">
              <ul>
                <li class="row-counts">Total Post: <span id='total_row_quotation'><?php print $total?></span></li>
              </ul>
            </div>
            <div class="widget-box">
              <table id="inti-quotation" class="table table-striped">
                <thead>
                  <tr>
                    <th><?php print lang("date")?></th>
                    <th>STA</th>
                    <th><?php print lang("note")?></th>
                    <th><?php print lang("ref")?></th>
                    <th><?php print lang("debit")?></th>
                    <th><?php print lang("kredit")?></th>
                    <th><?php print lang("saldo")?></th>
                  </tr>
                </thead>
                <tbody id="ajax-body-quotation">
                </tbody>
              </table>
              <input type="text" value="create_date" id="field_simpan" style="display: none" />
              <input type="text" value="desc" id="sort_simpan" style="display: none" />
            </div>
          </div>
				</div>
			</div>
		</div>
  </div>
</div>

<script>
  function add_row_tambahan(table,url,act,param){
    var no = parseInt($('#'+param).val());
    $('#'+param).val(no+1);
    $.post(url,{no:$('#'+param).val(),action:act},function(data){
        $(data).clone(true).insertBefore("#"+table+" #"+act);
    });
  }
  function del_row_class(tr){
    $("."+tr).remove();
  }
  
  $(document).ready( function () {
    
    del_row_class('ajax-quotation');
    add_row_tambahan('inti-quotation','<?php print site_url("keuangan-mahasiswa/ajax-kas-mahasiswa/{$nim}/".$id_keuangan_mahasiswa_jenis_virtual_account)?>/'+$('#total_row_quotation').text(),'ajax-body-quotation');
  });
  function load_quotation(id){
    if(id == undefined){
      id = 0;
    }
    del_row_class('ajax-quotation');
    add_row_tambahan('inti-quotation','<?php print   site_url("keuangan-mahasiswa/ajax-kas-mahasiswa/{$nim}/".$id_keuangan_mahasiswa_jenis_virtual_account)?>/'+$('#total_row_quotation').text()+'/'+id,'ajax-body-quotation');
    return false;
  }
  
</script>